package com.ocom.srvpamh.feignclient;


import com.ocom.common.constant.SrvpAccessDeviceUrl;
import com.ocom.common.entity.access.EntityMjDeviceInfoExtend;
import com.ocom.common.resp.RespMachMessage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "srvpaccess")
public interface SrvpaccessClientService {

	// 获取设备同步信息标志
	@GetMapping(value = SrvpAccessDeviceUrl.URLP_ACCESSDEVICE_getDeviceFlag)
	RespMachMessage getDeviceFlag(@RequestParam("companyId")Long companyId,@RequestParam("machNo") String machNo,@RequestParam("versionCode") String versionCode,@RequestParam("commMode") Integer commMode);


	@GetMapping(value = SrvpAccessDeviceUrl.URLP_ACCESSDEVICE_getMachPara)
	RespMachMessage getMachPara(@RequestParam("companyId")Long companyId,@RequestParam("machNo") String machNo);

//	@PostMapping(value = SrvpAccessDeviceUrl.URLP_savePersonRecode)
//	Result SaveRecode(@RequestBody DoorRecodeVo doorRecodeVo);

	@PostMapping(value = SrvpAccessDeviceUrl.URLP_ACCESSDEVICE_getReginIdByMach)
	RespMachMessage getReginIdByMach(@RequestParam("comId")Long comId, @RequestParam("machNo")String machNo);

	//更改设备参数状态
	@PostMapping(value = SrvpAccessDeviceUrl.URLP_ACCESSDEVICE_changeMachParaState)
	RespMachMessage changeMachParaState(@RequestParam("companyId")Long companyId, @RequestParam("machNo")String machNo, @RequestParam("jobId")String jobId);


	@PostMapping(value = SrvpAccessDeviceUrl.URL_getPersonInfoByCard)
	RespMachMessage getPersonInfoByCard(@RequestParam("companyId")Long companyId, @RequestParam("card")String card);


	@PostMapping(value = SrvpAccessDeviceUrl.URL_getPersonInfoByPId)
	public RespMachMessage getPersonInfoByPId(@RequestParam("companyId")Long companyId,@RequestParam("pId") Long pId);


	@PostMapping(value = SrvpAccessDeviceUrl.URLP_DEVICE_UPDATE_EXTEND_INFO)
	public RespMachMessage updateDeviceExtend(@RequestBody EntityMjDeviceInfoExtend entityMjDeviceInfoExtend);


	@PostMapping(value = SrvpAccessDeviceUrl.URLP_DEVICE_GET_EXTEND_INFO)
	public RespMachMessage<EntityMjDeviceInfoExtend> getDeviceExtend(@RequestBody EntityMjDeviceInfoExtend entityMjDeviceInfoExtend);


}
